<?php
	//unset($_SESSION['cart4']);
	$data             = array();
	$data['title']    = "Sửa hóa đơn nhập";
	$data['template'] = "import/update";
	$data['act']      = 0;
	$id = $_GET['cid'];
	$data['id'] = $_GET['cid'];
	$db =  new model_meterials;
	$order = new Model_order;
	$cart = new Model_mcart;
	$data['info'] = $order->get_order2($id);
	if(!isset($data['info']['id'])){redirect(base_url."index.php?mod=order&act=list");}
	
	$unserial = $data['info']['chuoi'];
	$serial = unserialize($unserial);
	foreach($serial as $key => $value){
		$_SESSION['cart4'][$key]['name'] = $value['name'];
		$_SESSION['cart4'][$key]['qty'] = $value['qty'];
		$_SESSION['cart4'][$key]['id'] = $value['id'];
		$_SESSION['cart4'][$key]['price'] = $value['price'];
	}
	$data['list_pro'] = $db->list_meterials(0,100);
	//debug($_SESSION['cart4']);
	loadview("layout",$data);
	